package net.coolcollege.configuration;

import net.coolcollege.operator.ActiveMqSender;
import net.coolcollege.operator.MessageTranslator;
import net.coolcollege.operator.Sender;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.jms.JmsProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author meng
 */
@Configuration
@ConditionalOnClass(JmsProperties.class)
public class MqSenderConfiguration {

    @Bean
    public Sender sender() {
        return new ActiveMqSender();
    }

    @Bean
    public MessageTranslator messageTranslator() {
        return new MessageTranslator();
    }
}
